<?php
$table=mysql_real_escape_string($table);
$q=$db->prepare("show tables like '$table'");
$q->execute();
$exists=($q->fetchColumn()==$table);
echo$exists?'*found ':'* didnt find ',$table,'*<br/>';

/*
unset($table);
unset($q);
*/

/*
$q=$db->query("select count(*) from information_schema.tables where table_schema =$table");
function tables($proc,$db,$name=''){
    $q=$db->prepare('show tables '.mysql_real_escape_string($name));
    $q->execute();
    while($row=$q->fetch())$proc($row[0]);
}
*/
?>


